package com.lnu_devteam.zongce.constant;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;

/**
 * @author xbaozi
 * @version 1.0
 * @interface ThreadPoolConstant
 * @date 2023-03-24  11:28
 * @description 线程池常量
 */
public interface ThreadPoolConstant {
    /**
     * 核心线程数
     */
    int corePoolSize = 32;
    /**
     * 最大线程数
     */
    int maxPoolSize = 100;
    /**
     * 线程存活时间
     */
    long keepAliveSeconds = 60;

    /**
     * 存活时间单位
     */
    TimeUnit unit = TimeUnit.SECONDS;

    /**
     * 阻塞队列容量
     */
    int queueCapacity = 10000;

    /**
     * 工作队列
     */
    BlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<>(queueCapacity);
}
